#ifndef FACEDETECTOR_H
#define FACEDETECTOR_H

#include <QObject>
#include <QImage>
#include <QString>
#include <QVector>
#include "opencv2/objdetect/objdetect.hpp"
#include "opencv2/core/core.hpp"
class FaceDetector : public QObject
{
    Q_OBJECT
public:
    explicit FaceDetector(QObject *parent = 0);

    bool Init();

    void DoDetect(QImage&);
    void DoDetect(cv::Mat frame);
private:


    QString mFaceCascadePath;
    QString mEyeCascadePath;

    cv::CascadeClassifier mFaceCascade;
    cv::CascadeClassifier mEyeCascade;

    QVector<QRect> mFaces;
};

#endif // FACEDETECTOR_H
